<?xml version="1.0" encoding="UTF-8"?>
<project name="kawa_rules" default="help">
   <target name="-post-compile" depends="scompile">
   </target>

   <!-- Compile this project's .scm files into .class files. -->
   <target name="scompile" depends="-compile">
      <xpath input="${manifest.abs.file}" expression="/manifest/application/activity/@android:name" output="android.activity.name" />
      <propertybyreplace name="project.app.package.path" input="${project.app.package}" replace="." with="/" />
      <java failonerror="true" fork="true" classname="kawa.repl">
         <classpath>
            <pathelement path="libs/kawa.jar" />
            <pathelement path="${sdk.dir}/platforms/${target}/android.jar" />
            <pathelement path="${out.classes.absolute.dir}" />
         </classpath>
         <arg value="-d" />
         <arg path="${out.classes.absolute.dir}" />
         <arg line="-P ${project.app.package}. --warn-undefined-variable --module-static-run --warn-invoke-unknown-method --warn-as-error" />
         <arg value="-C" />
         <arg file="src/${project.app.package.path}/${android.activity.name}.scm" />
      </java>
   </target>
</project>
